<template>
  <div id="balance">
    <img :src="img" alt="" v-if="imgShow">
    <div class="number">
      <p>{{number}}</p>
      <slot name="title"><p>我的珍珠余额</p></slot> 
    </div>
  </div>
</template>

<script>
import img from '@/assets/images/log.svg'
  export default {
    props: {
      imgShow: {
        type: Boolean,
        default: false
      },
      number:{
        type:Number,
        default: 0.00000
      }
    },
    data() {
      return {
        img,
      }
    },
  }
</script>

<style lang="scss" scoped>
  #balance{
    width: 300px;
    height: 135px;
    border: 1px solid #e2cfd5;
    border-radius: 12px;
    background: #f0e7ea;
    box-shadow: inset 1px 1px 0 #f7f2f4;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    margin-right: 20px;
    text-overflow: ellipsis;
    &>img{
      width: 34px;
      height: 34px;
      margin-right: 20px;
    }
    .number{
      p{
        margin: 0;
      }
      p:nth-child(1){
        font-size: 36px;
        font-weight: 700;
        color: #5b2639;
        margin-bottom: 10px;
      }
       p:nth-child(2){
        font-size: 16px;
        color: #aa8592;
      }
    }
  }
</style>